package com.xzwzz.kotlindemo.video

data class VideoDataBean(
    var juanming: String,
    var zhuanti: String,
    var shipin: String,
    var categoryTime: String,
    var mingcheng: String,
    var videoTIme: String,
    var videoSize: String,
    var testPoint: String,
    var teacher: String,
    var daibiao: String,
    var daibiaoDesc: String,
    var classId: String,
    var sort: String,
    var year: String,
    var course: String,
    var juanTime: String,
    var juanDesc: String
) {
    fun toListString(): List<String> {
        return listOf(
            juanming,
            zhuanti,
            shipin,
            categoryTime,
            mingcheng,
            videoTIme,
            videoSize,
            testPoint,
            teacher,
            daibiao,
            daibiaoDesc,
            classId,
            sort,
            year,
            course,
            juanTime,
            juanDesc
        )
    }

    constructor(item: ExcelSourceBean, courseId: String, sort: String, year: String, course: String) : this(
        item.juanming,
        item.zhuanti,
        item.shipin,
        item.categoryTime,
        item.mingcheng,
        item.videoTIme,
        item.videoSize,
        item.testPoint,
        item.teacher,
        item.daibiao,
        item.daibiaoDesc,
        courseId,
        sort,
        year,
        course,
        item.juanTime,
        item.juanDesc
    )

    constructor(item: VideoOriganBean) : this(
        if (item.courseName == "技巧") item.realCourse else item.juanming.replace("全考点普查专题", "").replace(
            "方法技巧普查卷",
            "普查卷"
        ),
        item.zhuanti,
        item.shipin,
        item.categoryTime,
        item.mingcheng,
        item.videoTime,
        item.videoSize,
        item.testPoint,
        item.teacher,
        item.daibiao,
        item.daibiaoDesc ?: "",
        item.courseId,
        item.sort,
        item.year,
        item.courseName,
        item.juanTime?:"未知",
        item.juanDesc

    )
}